Skip to content

Conversation

@jeqo
Copy link
Contributor

@jeqo jeqo commented Jan 9, 2026

Change MetadataView#getTopicConfig to return LogConfig instead of Properties, consolidating the responsibility of merging default and topic-specific configurations into the MetadataView implementation.

This simplifies callers by:

  • Removing redundant LogConfig.fromProps() calls in RetentionEnforcer and AppendHandler
  • Eliminating the need for callers to access default configs separately
  • Reducing test setup by removing mock configuration for default configs

The InklessMetadataView now handles merging default configs with topic overrides internally, providing a fully-resolved LogConfig to consumers.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the MetadataView#getTopicConfig method to return LogConfig instead of Properties, consolidating configuration merging logic into the MetadataView implementation. This simplifies callers by removing redundant LogConfig.fromProps() calls and eliminates the need to separately access default configurations.

Key changes:

  • Interface change in MetadataView to return LogConfig instead of Properties
  • Implementation in InklessMetadataView now merges default and topic-specific configs internally
  • Simplified caller code in AppendHandler and RetentionEnforcer

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
storage/inkless/src/main/java/io/aiven/inkless/control_plane/MetadataView.java Updated interface method signature to return LogConfig instead of Properties
core/src/main/scala/kafka/server/metadata/InklessMetadataView.scala Implemented getTopicConfig to merge default configs with topic overrides using LogConfig.fromProps
storage/inkless/src/main/java/io/aiven/inkless/produce/AppendHandler.java Simplified getLogConfigs method by removing LogConfig.fromProps call and refactored constructor to accept Function<String, LogConfig>
storage/inkless/src/main/java/io/aiven/inkless/delete/RetentionEnforcer.java Replaced LogConfig.fromProps call with direct method reference to getTopicConfig
storage/inkless/src/test/java/io/aiven/inkless/produce/AppendHandlerTest.java Simplified test setup by removing SharedState and related mock dependencies
storage/inkless/src/test/java/io/aiven/inkless/delete/RetentionEnforcerTest.java Updated mocks to return LogConfig instead of Properties and added try-with-resources for proper cleanup
storage/inkless/src/test/java/io/aiven/inkless/merge/FileMergerIntegrationTest.java Simplified mock setup to return LogConfig directly
storage/inkless/src/test/java/io/aiven/inkless/delete/FileCleanerIntegrationTest.java Simplified mock setup to return LogConfig directly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Change MetadataView#getTopicConfig to return LogConfig instead of
Properties, consolidating the responsibility of merging default and
topic-specific configurations into the MetadataView implementation.

This simplifies callers by:
- Removing redundant LogConfig.fromProps() calls in RetentionEnforcer
  and AppendHandler
- Eliminating the need for callers to access default configs separately
- Reducing test setup by removing mock configuration for default configs

The InklessMetadataView now handles merging default configs with topic
overrides internally, providing a fully-resolved LogConfig to consumers.
@jeqo jeqo force-pushed the jeqo/refactor-metadata-logconfig branch from 1dce5f5 to 6e7b51f Compare January 9, 2026 17:54
@jeqo jeqo requested a review from Copilot January 9, 2026 17:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants